package com.hzsd.zengbanyi.biaodan_text.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.hzsd.zengbanyi.biaodan_text.R;
import com.hzsd.zengbanyi.biaodan_text.bean.LabSampleBean;


public class LabTopLeftFragment extends Fragment{
	private View view;
	private LabSampleBean labSampleBean;
	private TextView taskname;
	private TextView tv_AnalysisProject;
	private TextView tv_properties;
	private TextView tv_AnalysisMethod;
	private TextView tv_Instrument;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		view = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_lab_top_left, container,false);
		baseData();
		initView(view);
		return view;
	}

	private void baseData() {
		labSampleBean = (LabSampleBean) getArguments().getSerializable("LabSampleBean");
		
	}

	private void initView(View view) {
		taskname = (TextView) view.findViewById(R.id.taskname);
		tv_AnalysisProject = (TextView) view.findViewById(R.id.tv_AnalysisProject);
		tv_properties = (TextView) view.findViewById(R.id.tv_properties);
		tv_AnalysisMethod = (TextView) view.findViewById(R.id.tv_AnalysisMethod);
		tv_Instrument = (TextView) view.findViewById(R.id.tv_Instrument);
		
		taskname.setText(labSampleBean.getName());
		tv_AnalysisProject.setText(labSampleBean.getAnalysisProject());
		tv_properties.setText(labSampleBean.getProperties());
		tv_AnalysisMethod.setText(labSampleBean.getAnalysisMethod());
		tv_Instrument.setText(labSampleBean.getInstrument());
		
	}
}
